package cn.aib.payservice.client;

import cn.aib.commonutils.R;
import cn.aib.commonutils.vo.OrderVo;
import cn.aib.payservice.client.impl.OrderClientImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient(name = "service-order",fallback = OrderClientImpl.class)
@Component
public interface OrderClient {
    //获取订单信息
    @GetMapping("/orderservice/order/getOrderInfoToPay/{orderNum}")
    public OrderVo getOrderInfo(@PathVariable("orderNum") String orderNum);

    @PostMapping("/orderservice/order/updateOrderStatus")
    R updateOrderStatus(OrderVo order);
}
